<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/11/28
  Time: 23:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>撰写文章</title>
    <script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/ueditor/ueditor.all.min.js"> </script>
    <script type="text/javascript">
        var ue = UE.getEditor('content');
    </script>



</head>
<body>
<div class="container margin-top-10">
    <div class="col-sm-8">
        <div class="panel panel-default">
            <div class="panel-body">
                <form method="post" name="newBlogForm" id="newBlogForm" action="${pageContext.request.contextPath}/newBlog.blog">
                    <input type="hidden" name="n_sid" id="n_sid" value="${student.sid}">
                    <div class="form-group">
                        <label>日志标题:</label><label class="control-label error-info" style="text-align:left;">*不能为空</label>
                        <input type="text" class="form-control" id="n_title" name = "n_title">
                    </div>
                    <div class="form-group">
                        <label>日志正文:</label><label class="control-label error-info" style="text-align:left;">*不能为空</label>

                        <!-- 加载编辑器的容器 -->
                        <script id="n_content" name="n_content" type="text/plain">${blog.content}</script>

                        <!-- 实例化编辑器 -->
                        <script type="text/javascript">
                            var ue = UE.getEditor('n_content');
                        </script>
                    </div>
                    <div style="text-align: right;">
                        <button type="submit" class="btn btn-success">发表</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
